package ooday05;

public class enumerate {
    public static void main(String[] args) {

       Season s =Season.SPRING;

       switch (s){
           case AUTUMN:
               System.out.println("天气"+s.getDescription()+"打雪仗");
               break;
           case SPRING:
               System.out.println("天气"+s.getDescription()+"放风筝");
               break;
           case SUMMER:
               System.out.println("天气"+s.getDescription()+"游水");
               break;
           case WINTER:
               System.out.println("天气"+s.getDescription()+"摘雪梨");
               break;
       }





        Season[] values = Season.values();

        for (Season se:values){
            System.out.println(se);

        }




    }
}

enum Season {

    SPRING("春天","暖"),
    SUMMER("夏天","热"),
    AUTUMN("秋天","凉"),
    WINTER("冬天","冷");

//    SPRING,
//    SUMMER,
//    AUTUMN,
//    WINTER;

    private String name;
    private String description;

//    Season(){}
    Season(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public String getName() {
        return name;
    }



    public String getDescription() {
        return description;
    }

    @Override
    public String toString() {
        return "Season{" +
                "name='" + name + '\'' +
                ", description='" + description + '\'' +
                '}';
    }


}
